$(function(){
	var sArr = [0, 120, 150, 140, 80];
	var index = {
		getTopData: function() {
			$.ajax({
			    url: wsCommon.host + '/api/index/main',
			    dataType: wsCommon.jsonType,
			    success: function(res) {
			        if(res.code == 1) {
			            var slide1 = res.data.slide1;
						var slide4 = res.data.slide4;
						var notices = res.data.notices;
						var sameCity = res.data.sameCity;
						var saleAd = res.data.sale;
						var limitGoods = res.data.limitGoods;
						var navMenu = res.data.navMenu;

						// 大图轮播
						index.swithimage(slide1);

						// 小图轮播
						index.handprice(slide4);

						//限购
						index.specialsale(limitGoods);

						index.notices(sameCity, notices, saleAd);
			        } else {
			            iosOverlay({
			                text: res.reason,
			                duration: 1000
			            });
			        }
			    },
			    error: function(e) {
			    }
			})
		},
		// 图片轮播
		swithimage: function(data) {
			var dataReal = data;
			var tpl = '';
			var data = data.pictures;
			$.each(data, function(index, item) {
				tpl += '<li class="switchable-panel" style=""> <a href="'+item.linkTarget+'"  target="_blank"> <img width="800px" height="327px" alt="'+item.linkInfo+'" src="'+item.link+'"> </a> </li>';
			})
			$('#ex_slide_591 ol').html(tpl);


			if(dataReal.autoplay) {
				var timeout = dataReal.interval * 1000;
			} else {
				var timeout = 0;
			}
			/**图片切换1**/
			$("#ex_slide_591 .switchable-content").cycle({
				pager: '#pager_591',
				activePagerClass: 'active',
				timeout: timeout,
				pagerAnchorBuilder: function(idx, slide){
						idx += 1;
						return '<li>'　+ idx + '</li>';
					}
				});
		},
		// 剁手价
		handprice: function(data) {
			var dataReal = data;
			var data = data.pictures;
			var tpl = '';
			$.each(data, function(index, item) {
				tpl += '<li class="switchable-panel" style="float: left;"> <a href="'+item.linkTarget+'" title="'+item.linkInfo+'" target="_blank"> <img width="198px" height="298px" alt="'+item.linkInfo+'" src="'+item.link+'"> </a> </li>';
			})
			$('#ex_slide_3123 ol').html(tpl);

			if(dataReal.autoplay) {
				var timeout = dataReal.interval * 1000;
			} else {
				var timeout = 0;
			}
			/**图片切换2**/
			$("#ex_slide_3123 .switchable-content").cycle({
				pager: '#pager_3123',
				activePagerClass: 'active',
				timeout: timeout,
				pagerAnchorBuilder: function(idx, slide){
						idx += 1;
						return '<li>'　+ idx + '</li>';
					}
				});
		},
		// 特价专场
		specialsale: function(limitGoods) {
			var specialList = limitGoods.productsList;
			var specialIMgWidth = sArr[limitGoods.picWidth];
			var tpl = '<a href="'+limitGoods.adPicLink+'" target="_blank" class="hd"><img src="'+limitGoods.adPic+'" alt="'+limitGoods.adPicTxt+'" width="299" height="149" style="cursor: pointer; cursor: hand;" ></a>\
						<div class="bd">\
							<ul class="clearfix">';

			$.each(specialList, function(index, item) {
				if(index > 4) return;
				if(item.defaultImage == null) {
					item.defaultImage = {}
					item.defaultImage.surl = '';
				}
				if(item.specPrice != 0) {
					var priceTpl = '<span class="price1">¥'+item.specPrice+'</span>'
					var mrkpriceTpl = '<span class="mktprice1">¥'+item.price+'</span>'
				} else {
					var priceTpl = '<span class="price1">¥'+item.price+'</span>'
					var mrkpriceTpl = ''
				}

				if(index == 1) {
					tpl += '<li class="wide-column"></li>';
				}
				if(index == 3) {
					tpl += '<li class="l'+(index+1)+' wide-column">\
							  <div class="goodpic" style="width:120px;height:120px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img src="'+item.defaultImage.surl+'" alt="'+item.name+'" width="'+specialIMgWidth+'" height="'+specialIMgWidth+'"></a> </div>\
							  <div class="info">\
								<h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>\
								<p>'+priceTpl+mrkpriceTpl+'</p>\
							  </div>\
							</li>';
				} else {
					tpl += '<li class="l'+(index+1)+'">\
							  <div class="goodpic" style="width:120px;height:120px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img src="'+item.defaultImage.surl+'" alt="'+item.name+'" width="'+specialIMgWidth+'" height="'+specialIMgWidth+'"></a> </div>\
							  <div class="info">\
								<h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>\
								<p>'+priceTpl+mrkpriceTpl+'</p>\
							  </div>\
							</li>';
				}

			})
			tpl += '</ul></div>'
			$('.limit-buy').html(tpl);
		},
		//公告+同城帮惠+广告条接口
		notices: function(sameCity, notice, saleAd) {
			var sameCityTpl = '<li><a href="'+sameCity.adPicLink+'" target="_blank"><img src="'+sameCity.adPic+'" width="200px" height="209px"></a></li>';
			$('.shopTips ul').html(sameCityTpl);

			var saleAdTpl = '<a href="'+saleAd.adPicLink+'" target="_blank"> <img src="'+saleAd.adPic+'" width="1190px" height="80px" alt=""> </a>';
			$('.saleAd').html(saleAdTpl);

			var noticeTpl = '';
			var notice = notice.list;
			$.each(notice, function(index, item) {
				noticeTpl += '<li><a title="'+item.title+'" href="/article/article-news-'+item.id+'.html" target="_blank">'+item.title+'</a></li>';
			})
			$('.article-list ul').html(noticeTpl);
		},
		// 猜你喜欢
		guessyoulikeTpl: function(goods) {
			var goodsTpl = '';
			$.each(goods, function(index, item) {
				if(item.defaultImage == null) {
					item.defaultImage = {
						surl: ''
					}
				}
				var mktpriceTpl = '';
				if(item.specPrice != 0) {
					mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
					mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
				} else {
					mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
				}

				goodsTpl += '<li>\
								  <div class="goodpic lazypic-init" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;padding-right:0;margin-right: 8px;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="100%" height="100%" class="lazy"  src="'+item.defaultImage.surl+'" style="display: inline;"></a></div>\
								  <div class="info">\
									<h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'\
								  </div>\
								</li>';
			})
			$('[data-role="guessyoulike-main"] ul').html(goodsTpl);
		},
		guessyoulike: function() {
			$.ajax({
                url: wsCommon.host + '/api/index/fav',
                dataType: wsCommon.jsonType,
                success: function(res) {
                    if(res.code == 1) {
						var images = res.data.adverts;
						var imagesTpl = '';
						$.each(images, function(index, item) {
							if(index == 1) {
								imagesTpl += '<div class="AdvBanner last lazypic-init" style="margin-bottom:0px;"> <a href="'+item.toLink+'" title="'+item.text+'" target="_blank"><img width="396" height="180" alt="'+item.text+'" class="lazy" data-original="'+item.link+'" style="display: block;"></a> </div>';
							} else {
								imagesTpl += '<div class="AdvBanner last lazypic-init" style="margin-bottom:0px;"> <a href="'+item.toLink+'" title="'+item.text+'" target="_blank"><img width="397" height="180" alt="'+item.text+'" class="lazy" data-original="'+item.link+'" style="display: block;"></a> </div>';
							}
						})
						$('.ad-show .qf_ad').html(imagesTpl);

						// var middleAd = res.data.middleAd;
						// var saleAdTpl = '<a href="'+middleAd.imgLink+'" target="_blank"> <img src="'+middleAd.imgUrl+'" alt="" width="1190px" height="80px"> </a>';
						// $('.guessyoulikeAd').html(saleAdTpl);

						var goods = res.data.favGoods;
						$('[data-role="guess"]').html(goods.title);
						window.guessResult = [];
						window.guessResultIndex = 0;
						for(var i = 0,len = goods.productsList.length;i<len;i+=12){
						   guessResult.push(goods.productsList.slice(i,i+12));
						}
						window.guessResultMaxIndex = guessResult.length;
						if(guessResult.length == 0) return;

						index.guessyoulikeTpl(guessResult[0]);
						index.lazyload();
                    } else {
                        iosOverlay({
                            text: res.reason,
                            duration: 1000
                        });
                    }
                },
                error: function(e) {
				}
            })
		},
		// 换一批
		changeGuessYouLike: function() {
			$('[data-role="changeAll"]').on('click', function() {
				if(guessResultMaxIndex == 0 ) return;
				++guessResultIndex;
				if(guessResultIndex <= guessResultMaxIndex - 1) {
					index.guessyoulikeTpl(guessResult[guessResultIndex]);
					console.log(guessResultIndex);
				} else {
					guessResultIndex = 0;
					index.guessyoulikeTpl(guessResult[guessResultIndex]);
				}
			})
		},

		// 1F
		onefloorData: function() {
			// rank
			$.ajax({
				url: wsCommon.host + '/api/index/1',
				dataType: wsCommon.jsonType,
				success: function(res) {
					if(res.code == 1) {
						// 左侧大图片
						var adverts8 = res.data.adverts8[0];
						var leftAdTpl = '<a href="'+adverts8.toLink+'" title="'+adverts8.text+'" target="_blank"><img width="190" height="400" alt="'+adverts8.text+'" class="lazy" data-original="'+adverts8.link+'"></a>';
						$('[data-role="AdvBanner-1f"]').html(leftAdTpl);

						var adverts9 = res.data.adverts9;
						var imagesTpl = '';
						$.each(adverts9, function(index, item) {
							if(index > 3) return;
							imagesTpl += '<div class="AdvBanner lazypic-init" style="margin-bottom:0px;"> <a href="'+item.toLink+'" title="'+item.text+'" target="_blank"><img width="210" height="270" alt="'+item.text+'" class="lazy" data-original="'+item.link+'"></a> </div>';
						})
						$('[data-role="images-1f"]').html(imagesTpl);

						var tabGoods10 = res.data.tabGoods10;
						var goodsTpl = '';
						$.each(tabGoods10.productsList, function(index, item) {
							if(index > 3) return;
							if(item.defaultImage == null) {
								item.defaultImage = {
									surl: ''
								}
							}

							var mktpriceTpl = '';
							if(item.specPrice != 0) {
								mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
								mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
							} else {
								mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
							}

							goodsTpl += '<li>\
						                  <div class="goodpic lazypic-init" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="80" height="80" class="lazy" data-original="'+item.defaultImage.surl+'"></a> </div>\
						                  <div class="info">\
						                    <h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'</div>\
						                </li>';
						})
						$('[data-role="goods-1f"]').html(goodsTpl);

						var navs11 = res.data.navs11;
						if(navs11 != null) {
							var goodsCatsTpl11 = '<ul class="qfnavs">';
							$.each(navs11, function(indexDir, itemDir) {
								goodsCatsTpl11 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl11 += '</ul>';
							$('[data-role="goodsCats-1f"]').append(goodsCatsTpl11);
						}


						var navs12 = res.data.navs12;
						if(navs12 != null) {
							var goodsCatsTpl12 = '<ul class="qfnavs">';
							$.each(navs12, function(indexDir, itemDir) {
								goodsCatsTpl12 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl12 += '</ul>';
							$('[data-role="goodsCats-1f"]').append(goodsCatsTpl12);
						}

						var navs13 = res.data.navs13;
						if(navs13 != null) {
							var goodsCatsTpl13 = '<ul class="qfnavs">';
							$.each(navs13, function(indexDir, itemDir) {
								goodsCatsTpl13 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl13 += '</ul>';
							$('[data-role="goodsCats-1f"]').append(goodsCatsTpl13);
						}


						var adPic24 = res.data.adPic24;
						var adPic24Tpl = '';
						if(adPic24 != null) {
							adPic24Tpl += '<div class="logosBg logoshover" style="left: 11px; top: 24px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic24.adPicLink+'" target="_blank"><img data-original="'+adPic24.adPic+'" alt="'+adPic24.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic24Tpl);

						var adPic25 = res.data.adPic25;
						var adPic25Tpl = '';
						if(adPic25 != null) {
							adPic25Tpl += '<div class="logosBg" style="left: 102px; top: 24px;">\
									  <div class="logos" style="left: 22px; top: 21px;"> <a href="'+adPic25.adPicLink+'" target="_blank"><img data-original="'+adPic25.adPic+'" alt="'+adPic25.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic25Tpl);

						var adPic26 = res.data.adPic26;
						var adPic26Tpl = '';
						if(adPic26 != null) {
							adPic26Tpl += '<div class="logosBg" style="left: 55px; top: 69px;">\
									  <div class="logos" style="left: 23px; top: 21px;"> <a href="'+adPic26.adPicLink+'" target="_blank"><img data-original="'+adPic26.adPic+'" alt="'+adPic26.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic26Tpl);

						var adPic27 = res.data.adPic27;
						var adPic27Tpl = '';
						if(adPic27 != null) {
							adPic27Tpl += '<div class="logosBg" style="top: 113px; left: 11px;">\
									  <div class="logos" style="left: 21px; top: 21px;"> <a href="'+adPic27.adPicLink+'" target="_blank"><img data-original="'+adPic27.adPic+'" alt="'+adPic27.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic27Tpl);

						var adPic28 = res.data.adPic28;
						var adPic28Tpl = '';
						if(adPic28 != null) {
							adPic28Tpl += '<div class="logosBg" style="left: 102px; top: 114px;">\
									  <div class="logos" style="left: 20px; top: 21px;"> <a href="'+adPic28.adPicLink+'" target="_blank"><img data-original="'+adPic28.adPic+'" alt="'+adPic28.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic28Tpl);

						var adPic29 = res.data.adPic29;
						var adPic29Tpl = '';
						if(adPic29 != null) {
							adPic29Tpl += '<div class="logosBg" style="top: 159px; left: 53px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic29.adPicLink+'" target="_blank"><img data-original="'+adPic29.adPic+'" alt="'+adPic29.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic29Tpl);

						var adPic30 = res.data.adPic30;
						var adPic30Tpl = '';
						if(adPic30 != null) {
							adPic30Tpl += '<div class="logosBg" style="left: 11px; top: 202px;">\
									  <div class="logos" style="top: 21px; left: 23px;"> <a href="'+adPic30.adPicLink+'" target="_blank"><img data-original="'+adPic30.adPic+'" alt="'+adPic30.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic30Tpl);

						var adPic31 = res.data.adPic31;
						var adPic31Tpl = '';
						if(adPic31 != null) {
							adPic31Tpl += '<div class="logosBg" style="top: 203px; left: 102px;">\
									  <div class="logos" style="top: 21px; left: 20px;"> <a href="'+adPic31.adPicLink+'" target="_blank"><img data-original="'+adPic31.adPic+'" alt="'+adPic31.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic31Tpl);

						var adPic32 = res.data.adPic32;
						if(adPic32 != null) {
							var adPic32Tpl = '<a href="'+adPic32.adPicLink+'" target="_blank"><img data-original="'+adPic32.adPic+'" alt="'+adPic32.adPicTxt+'" width="200" height="100"></a>';
							$('[data-role="hotBrands-1f"] .floor-bottom').html(adPic32Tpl)
						}

						var rank = res.data.rank ? res.data.rank : [];
						var weekTpl = '';
						var weekBdTpl = '';
						var weekTplLen = rank.length;
						$.each(rank, function(index, item) {
							if(index == 0) {
								weekTpl += '<li class="tab-on"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else if(index == (weekTplLen - 1)) {
								weekTpl += '<li class="last"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else {
								weekTpl += '<li><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							}

							if(index == 0) {
								weekBdTpl += '<div class="bd" style="display: block;">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									if(indexDir > 4) return;
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							} else {
								weekBdTpl += '<div class="bd">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							}
						})
						$('[data-role="hotweek-1f"] .GoodsList-Tabs ul').html(weekTpl);
						$('[data-role="hotweek-1f"]').append(weekBdTpl);
						index.lazyload();

					} else {
						iosOverlay({
							text: res.reason,
							duration: 1000
						});
					}
				},
				error: function(e) {
				}
			})
		},
		twofloorData: function() {
			// rank
			$.ajax({
				url: wsCommon.host + '/api/index/2',
				dataType: wsCommon.jsonType,
				success: function(res) {
					if(res.code == 1) {
						// 左侧大图片
						var adverts8 = res.data.adverts33[0];
						var leftAdTpl = '<a href="'+adverts8.toLink+'" title="'+adverts8.text+'" target="_blank"><img width="190" height="400" alt="'+adverts8.text+'" class="lazy" data-original="'+adverts8.link+'"></a>';
						$('[data-role="AdvBanner-2f"]').html(leftAdTpl);

						var adverts9 = res.data.adverts34;
						var imagesTpl = '';
						$.each(adverts9, function(index, item) {
							if(index > 3) return;
							imagesTpl += '<div class="AdvBanner lazypic-init" style="margin-bottom:0px;"> <a href="'+item.toLink+'" title="'+item.text+'" target="_blank"><img width="210" height="270" alt="'+item.text+'" class="lazy" data-original="'+item.link+'"></a> </div>';
						})
						$('[data-role="images-2f"]').html(imagesTpl);

						var tabGoods10 = res.data.tabGoods35?res.data.tabGoods35:[];
						var goodsTpl = '';
						$.each(tabGoods10.productsList, function(index, item) {
							if(index > 3) return;
							if(item.defaultImage == null) {
								item.defaultImage = {
									surl: ''
								}
							}

							var mktpriceTpl = '';
							if(item.specPrice != 0) {
								mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
								mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
							} else {
								mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
							}

							goodsTpl += '<li>\
						                  <div class="goodpic lazypic-init" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="80" height="80" class="lazy" data-original="'+item.defaultImage.surl+'"></a> </div>\
						                  <div class="info">\
						                    <h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'</div>\
						                </li>';
						})
						$('[data-role="goods-2f"]').html(goodsTpl);

						var navs11 = res.data.navs36;
						if(navs11 != null) {
							var goodsCatsTpl11 = '<ul class="qfnavs">';
							$.each(navs11, function(indexDir, itemDir) {
								goodsCatsTpl11 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl11 += '</ul>';
							$('[data-role="goodsCats-2f"]').append(goodsCatsTpl11);
						}


						var navs12 = res.data.navs37;
						if(navs12 != null) {
							var goodsCatsTpl12 = '<ul class="qfnavs">';
							$.each(navs12, function(indexDir, itemDir) {
								goodsCatsTpl12 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl12 += '</ul>';
							$('[data-role="goodsCats-2f"]').append(goodsCatsTpl12);
						}

						var navs13 = res.data.navs38;
						if(navs13 != null) {
							var goodsCatsTpl13 = '<ul class="qfnavs">';
							$.each(navs13, function(indexDir, itemDir) {
								goodsCatsTpl13 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl13 += '</ul>';
							$('[data-role="goodsCats-2f"]').append(goodsCatsTpl13);
						}


						var adPic24 = res.data.adPic49;
						var adPic24Tpl = '';
						if(adPic24 != null) {
							adPic24Tpl += '<div class="logosBg logoshover" style="left: 11px; top: 24px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic24.adPicLink+'" target="_blank"><img data-original="'+adPic24.adPic+'" alt="'+adPic24.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic24Tpl);

						var adPic25 = res.data.adPic50;
						var adPic25Tpl = '';
						if(adPic25 != null) {
							adPic25Tpl += '<div class="logosBg" style="left: 102px; top: 24px;">\
									  <div class="logos" style="left: 22px; top: 21px;"> <a href="'+adPic25.adPicLink+'" target="_blank"><img data-original="'+adPic25.adPic+'" alt="'+adPic25.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic25Tpl);

						var adPic26 = res.data.adPic51;
						var adPic26Tpl = '';
						if(adPic26 != null) {
							adPic26Tpl += '<div class="logosBg" style="left: 55px; top: 69px;">\
									  <div class="logos" style="left: 23px; top: 21px;"> <a href="'+adPic26.adPicLink+'" target="_blank"><img data-original="'+adPic26.adPic+'" alt="'+adPic26.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic26Tpl);

						var adPic27 = res.data.adPic52;
						var adPic27Tpl = '';
						if(adPic27 != null) {
							adPic27Tpl += '<div class="logosBg" style="top: 113px; left: 11px;">\
									  <div class="logos" style="left: 21px; top: 21px;"> <a href="'+adPic27.adPicLink+'" target="_blank"><img data-original="'+adPic27.adPic+'" alt="'+adPic27.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic27Tpl);

						var adPic28 = res.data.adPic53;
						var adPic28Tpl = '';
						if(adPic28 != null) {
							adPic28Tpl += '<div class="logosBg" style="left: 102px; top: 114px;">\
									  <div class="logos" style="left: 20px; top: 21px;"> <a href="'+adPic28.adPicLink+'" target="_blank"><img data-original="'+adPic28.adPic+'" alt="'+adPic28.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic28Tpl);

						var adPic29 = res.data.adPic54;
						var adPic29Tpl = '';
						if(adPic29 != null) {
							adPic29Tpl += '<div class="logosBg" style="top: 159px; left: 53px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic29.adPicLink+'" target="_blank"><img data-original="'+adPic29.adPic+'" alt="'+adPic29.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic29Tpl);

						var adPic30 = res.data.adPic55;
						var adPic30Tpl = '';
						if(adPic30 != null) {
							adPic30Tpl += '<div class="logosBg" style="left: 11px; top: 202px;">\
									  <div class="logos" style="top: 21px; left: 23px;"> <a href="'+adPic30.adPicLink+'" target="_blank"><img data-original="'+adPic30.adPic+'" alt="'+adPic30.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic30Tpl);

						var adPic31 = res.data.adPic56;
						var adPic31Tpl = '';
						if(adPic31 != null) {
							adPic31Tpl += '<div class="logosBg" style="top: 203px; left: 102px;">\
									  <div class="logos" style="top: 21px; left: 20px;"> <a href="'+adPic31.adPicLink+'" target="_blank"><img data-original="'+adPic31.adPic+'" alt="'+adPic31.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic31Tpl);

						var adPic32 = res.data.adPic57;
						if(adPic32 != null) {
							var adPic32Tpl = '<a href="'+adPic32.adPicLink+'" target="_blank"><img data-original="'+adPic32.adPic+'" alt="'+adPic32.adPicTxt+'" width="200" height="100"></a>';
							$('[data-role="hotBrands-2f"] .floor-bottom').html(adPic32Tpl)
						}

						var rank = res.data.rank;
						var weekTpl = '';
						var weekBdTpl = '';
						var weekTplLen = rank.length
						$.each(rank, function(index, item) {
							if(index == 0) {
								weekTpl += '<li class="tab-on"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else if(index == (weekTplLen - 1)) {
								weekTpl += '<li class="last"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else {
								weekTpl += '<li><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							}

							if(index == 0) {
								weekBdTpl += '<div class="bd" style="display: block;">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							} else {
								weekBdTpl += '<div class="bd">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							}
						})
						$('[data-role="hotweek-2f"] .GoodsList-Tabs ul').html(weekTpl);
						$('[data-role="hotweek-2f"]').append(weekBdTpl);
						index.lazyload();


					} else {
						iosOverlay({
							text: res.reason,
							duration: 1000
						});
					}
				},
				error: function(e) {
				}
			})
		},
		threefloorData: function() {
			// rank
			$.ajax({
				url: wsCommon.host + '/api/index/3',
				dataType: wsCommon.jsonType,
				success: function(res) {
					if(res.code == 1) {
						// 左侧大图片
						var adverts8 = res.data.adverts58[0];
						var leftAdTpl = '<a href="'+adverts8.toLink+'" title="'+adverts8.text+'" target="_blank"><img width="190" height="400" alt="'+adverts8.text+'" class="lazy" data-original="'+adverts8.link+'"></a>';
						$('[data-role="AdvBanner-3f"]').html(leftAdTpl);

						var adverts9 = res.data.adverts59;
						var imagesTpl = '';
						$.each(adverts9, function(index, item) {
							if(index > 3) return;
							imagesTpl += '<div class="AdvBanner lazypic-init" style="margin-bottom:0px;"> <a href="'+item.toLink+'" title="'+item.text+'" target="_blank"><img width="210" height="270" alt="'+item.text+'" class="lazy" data-original="'+item.link+'"></a> </div>';
						})
						$('[data-role="images-3f"]').html(imagesTpl);

						var tabGoods10 = res.data.tabGoods60;
						var goodsTpl = '';
						$.each(tabGoods10.productsList, function(index, item) {
							if(index > 3) return;
							if(item.defaultImage == null) {
								item.defaultImage = {
									surl: ''
								}
							}

							var mktpriceTpl = '';
							if(item.specPrice != 0) {
								mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
								mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
							} else {
								mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
							}

							goodsTpl += '<li>\
						                  <div class="goodpic lazypic-init" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="80" height="80" class="lazy" data-original="'+item.defaultImage.surl+'"></a> </div>\
						                  <div class="info">\
						                    <h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'</div>\
						                </li>';
						})
						$('[data-role="goods-3f"]').html(goodsTpl);

						var navs11 = res.data.navs61;
						if(navs11 != null) {
							var goodsCatsTpl11 = '<ul class="qfnavs">';
							$.each(navs11, function(indexDir, itemDir) {
								goodsCatsTpl11 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl11 += '</ul>';
							$('[data-role="goodsCats-3f"]').append(goodsCatsTpl11);
						}


						var navs12 = res.data.navs62;
						if(navs12 != null) {
							var goodsCatsTpl12 = '<ul class="qfnavs">';
							$.each(navs12, function(indexDir, itemDir) {
								goodsCatsTpl12 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl12 += '</ul>';
							$('[data-role="goodsCats-3f"]').append(goodsCatsTpl12);
						}

						var navs13 = res.data.navs63;
						if(navs13 != null) {
							var goodsCatsTpl13 = '<ul class="qfnavs">';
							$.each(navs13, function(indexDir, itemDir) {
								goodsCatsTpl13 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl13 += '</ul>';
							$('[data-role="goodsCats-3f"]').append(goodsCatsTpl13);
						}


						var adPic24 = res.data.adPic74;
						var adPic24Tpl = '';
						if(adPic24 != null) {
							adPic24Tpl += '<div class="logosBg logoshover" style="left: 11px; top: 24px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic24.adPicLink+'" target="_blank"><img data-original="'+adPic24.adPic+'" alt="'+adPic24.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic24Tpl);

						var adPic25 = res.data.adPic75;
						var adPic25Tpl = '';
						if(adPic25 != null) {
							adPic25Tpl += '<div class="logosBg" style="left: 102px; top: 24px;">\
									  <div class="logos" style="left: 22px; top: 21px;"> <a href="'+adPic25.adPicLink+'" target="_blank"><img data-original="'+adPic25.adPic+'" alt="'+adPic25.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic25Tpl);

						var adPic26 = res.data.adPic76;
						var adPic26Tpl = '';
						if(adPic26 != null) {
							adPic26Tpl += '<div class="logosBg" style="left: 55px; top: 69px;">\
									  <div class="logos" style="left: 23px; top: 21px;"> <a href="'+adPic26.adPicLink+'" target="_blank"><img data-original="'+adPic26.adPic+'" alt="'+adPic26.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic26Tpl);

						var adPic27 = res.data.adPic77;
						var adPic27Tpl = '';
						if(adPic27 != null) {
							adPic27Tpl += '<div class="logosBg" style="top: 113px; left: 11px;">\
									  <div class="logos" style="left: 21px; top: 21px;"> <a href="'+adPic27.adPicLink+'" target="_blank"><img data-original="'+adPic27.adPic+'" alt="'+adPic27.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic27Tpl);

						var adPic28 = res.data.adPic78;
						var adPic28Tpl = '';
						if(adPic28 != null) {
							adPic28Tpl += '<div class="logosBg" style="left: 102px; top: 114px;">\
									  <div class="logos" style="left: 20px; top: 21px;"> <a href="'+adPic28.adPicLink+'" target="_blank"><img data-original="'+adPic28.adPic+'" alt="'+adPic28.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic28Tpl);

						var adPic29 = res.data.adPic79;
						var adPic29Tpl = '';
						if(adPic29 != null) {
							adPic29Tpl += '<div class="logosBg" style="top: 159px; left: 53px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic29.adPicLink+'" target="_blank"><img data-original="'+adPic29.adPic+'" alt="'+adPic29.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic29Tpl);

						var adPic30 = res.data.adPic80;
						var adPic30Tpl = '';
						if(adPic30 != null) {
							adPic30Tpl += '<div class="logosBg" style="left: 11px; top: 202px;">\
									  <div class="logos" style="top: 21px; left: 23px;"> <a href="'+adPic30.adPicLink+'" target="_blank"><img data-original="'+adPic30.adPic+'" alt="'+adPic30.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic30Tpl);

						var adPic31 = res.data.adPic81;
						var adPic31Tpl = '';
						if(adPic31 != null) {
							adPic31Tpl += '<div class="logosBg" style="top: 203px; left: 102px;">\
									  <div class="logos" style="top: 21px; left: 20px;"> <a href="'+adPic31.adPicLink+'" target="_blank"><img data-original="'+adPic31.adPic+'" alt="'+adPic31.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic31Tpl);

						var adPic32 = res.data.adPic82;
						if(adPic32 != null) {
							var adPic32Tpl = '<a href="'+adPic32.adPicLink+'" target="_blank"><img data-original="'+adPic32.adPic+'" alt="'+adPic32.adPicTxt+'" width="200" height="100"></a>';
							$('[data-role="hotBrands-3f"] .floor-bottom').html(adPic32Tpl)
						}

						var rank = res.data.rank;
						var weekTpl = '';
						var weekBdTpl = '';
						var weekTplLen = rank.length
						$.each(rank, function(index, item) {
							if(index == 0) {
								weekTpl += '<li class="tab-on"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else if(index == (weekTplLen - 1)) {
								weekTpl += '<li class="last"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else {
								weekTpl += '<li><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							}

							if(index == 0) {
								weekBdTpl += '<div class="bd" style="display: block;">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							} else {
								weekBdTpl += '<div class="bd">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p>  '+mktpriceTpl+'  </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							}
						})
						$('[data-role="hotweek-3f"] .GoodsList-Tabs ul').html(weekTpl);
						$('[data-role="hotweek-3f"]').append(weekBdTpl);
						index.lazyload();


					} else {
						iosOverlay({
							text: res.reason,
							duration: 1000
						});
					}
				},
				error: function(e) {
				}
			})
		},
		fourfloorData: function() {
			// rank
			$.ajax({
				url: wsCommon.host + '/api/index/4',
				dataType: wsCommon.jsonType,
				success: function(res) {
					if(res.code == 1) {
						// 左侧大图片
						var adverts8 = res.data.adverts83[0];
						var leftAdTpl = '<a href="'+adverts8.toLink+'" title="'+adverts8.text+'" target="_blank"><img width="190" height="400" alt="'+adverts8.text+'" class="lazy" data-original="'+adverts8.link+'"></a>';
						$('[data-role="AdvBanner-4f"]').html(leftAdTpl);

						var adverts9 = res.data.adverts84;
						var imagesTpl = '';
						$.each(adverts9, function(index, item) {
							if(index > 3) return;
							imagesTpl += '<div class="AdvBanner lazypic-init" style="margin-bottom:0px;"> <a href="'+item.toLink+'" title="'+item.text+'" target="_blank"><img width="210" height="270" alt="'+item.text+'" class="lazy" data-original="'+item.link+'"></a> </div>';
						})
						$('[data-role="images-4f"]').html(imagesTpl);

						var tabGoods10 = res.data.tabGoods85;
						var goodsTpl = '';
						$.each(tabGoods10.productsList, function(index, item) {
							if(index > 3) return;
							if(item.defaultImage == null) {
								item.defaultImage = {
									surl: ''
								}
							}

							var mktpriceTpl = '';
							if(item.specPrice != 0) {
								mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
								mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
							} else {
								mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
							}

							goodsTpl += '<li>\
						                  <div class="goodpic lazypic-init" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="80" height="80" class="lazy" data-original="'+item.defaultImage.surl+'"></a> </div>\
						                  <div class="info">\
						                    <h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'</div>\
						                </li>';
						})
						$('[data-role="goods-4f"]').html(goodsTpl);

						var navs11 = res.data.navs86;
						if(navs11 != null) {
							var goodsCatsTpl11 = '<ul class="qfnavs">';
							$.each(navs11, function(indexDir, itemDir) {
								goodsCatsTpl11 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl11 += '</ul>';
							$('[data-role="goodsCats-4f"]').append(goodsCatsTpl11);
						}


						var navs12 = res.data.navs87;
						if(navs12 != null) {
							var goodsCatsTpl12 = '<ul class="qfnavs">';
							$.each(navs12, function(indexDir, itemDir) {
								goodsCatsTpl12 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl12 += '</ul>';
							$('[data-role="goodsCats-4f"]').append(goodsCatsTpl12);
						}

						var navs13 = res.data.navs88;
						if(navs13 != null) {
							var goodsCatsTpl13 = '<ul class="qfnavs">';
							$.each(navs13, function(indexDir, itemDir) {
								goodsCatsTpl13 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl13 += '</ul>';
							$('[data-role="goodsCats-4f"]').append(goodsCatsTpl13);
						}


						var adPic24 = res.data.adPic99;
						var adPic24Tpl = '';
						if(adPic24 != null) {
							adPic24Tpl += '<div class="logosBg logoshover" style="left: 11px; top: 24px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic24.adPicLink+'" target="_blank"><img data-original="'+adPic24.adPic+'" alt="'+adPic24.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic24Tpl);

						var adPic25 = res.data.adPic100;
						var adPic25Tpl = '';
						if(adPic25 != null) {
							adPic25Tpl += '<div class="logosBg" style="left: 102px; top: 24px;">\
									  <div class="logos" style="left: 22px; top: 21px;"> <a href="'+adPic25.adPicLink+'" target="_blank"><img data-original="'+adPic25.adPic+'" alt="'+adPic25.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic25Tpl);

						var adPic26 = res.data.adPic101;
						var adPic26Tpl = '';
						if(adPic26 != null) {
							adPic26Tpl += '<div class="logosBg" style="left: 55px; top: 69px;">\
									  <div class="logos" style="left: 23px; top: 21px;"> <a href="'+adPic26.adPicLink+'" target="_blank"><img data-original="'+adPic26.adPic+'" alt="'+adPic26.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic26Tpl);

						var adPic27 = res.data.adPic102;
						var adPic27Tpl = '';
						if(adPic27 != null) {
							adPic27Tpl += '<div class="logosBg" style="top: 113px; left: 11px;">\
									  <div class="logos" style="left: 21px; top: 21px;"> <a href="'+adPic27.adPicLink+'" target="_blank"><img data-original="'+adPic27.adPic+'" alt="'+adPic27.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic27Tpl);

						var adPic28 = res.data.adPic103;
						var adPic28Tpl = '';
						if(adPic28 != null) {
							adPic28Tpl += '<div class="logosBg" style="left: 102px; top: 114px;">\
									  <div class="logos" style="left: 20px; top: 21px;"> <a href="'+adPic28.adPicLink+'" target="_blank"><img data-original="'+adPic28.adPic+'" alt="'+adPic28.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic28Tpl);

						var adPic29 = res.data.adPic104;
						var adPic29Tpl = '';
						if(adPic29 != null) {
							adPic29Tpl += '<div class="logosBg" style="top: 159px; left: 53px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic29.adPicLink+'" target="_blank"><img data-original="'+adPic29.adPic+'" alt="'+adPic29.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic29Tpl);

						var adPic30 = res.data.adPic105;
						var adPic30Tpl = '';
						if(adPic30 != null) {
							adPic30Tpl += '<div class="logosBg" style="left: 11px; top: 202px;">\
									  <div class="logos" style="top: 21px; left: 23px;"> <a href="'+adPic30.adPicLink+'" target="_blank"><img data-original="'+adPic30.adPic+'" alt="'+adPic30.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic30Tpl);

						var adPic31 = res.data.adPic106;
						var adPic31Tpl = '';
						if(adPic31 != null) {
							adPic31Tpl += '<div class="logosBg" style="top: 203px; left: 102px;">\
									  <div class="logos" style="top: 21px; left: 20px;"> <a href="'+adPic31.adPicLink+'" target="_blank"><img data-original="'+adPic31.adPic+'" alt="'+adPic31.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic31Tpl);

						var adPic32 = res.data.adPic107;
						if(adPic32 != null) {
							var adPic32Tpl = '<a href="'+adPic32.adPicLink+'" target="_blank"><img data-original="'+adPic32.adPic+'" alt="'+adPic32.adPicTxt+'" width="200" height="100"></a>';
							$('[data-role="hotBrands-4f"] .floor-bottom').html(adPic32Tpl)
						}

						var rank = res.data.rank;
						var weekTpl = '';
						var weekBdTpl = '';
						var weekTplLen = rank.length
						$.each(rank, function(index, item) {
							if(index == 0) {
								weekTpl += '<li class="tab-on"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else if(index == (weekTplLen - 1)) {
								weekTpl += '<li class="last"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else {
								weekTpl += '<li><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							}

							if(index == 0) {
								weekBdTpl += '<div class="bd" style="display: block;">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							} else {
								weekBdTpl += '<div class="bd">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							}
						})
						$('[data-role="hotweek-4f"] .GoodsList-Tabs ul').html(weekTpl);
						$('[data-role="hotweek-4f"]').append(weekBdTpl);
						index.lazyload();


					} else {
						iosOverlay({
							text: res.reason,
							duration: 1000
						});
					}
				},
				error: function(e) {
				}
			})
		},
		fivefloorData: function() {
			// rank
			$.ajax({
				url: wsCommon.host + '/api/index/5',
				dataType: wsCommon.jsonType,
				success: function(res) {
					if(res.code == 1) {
						// 左侧大图片
						var adverts8 = res.data.adverts108[0];
						var leftAdTpl = '<a href="'+adverts8.toLink+'" title="'+adverts8.text+'" target="_blank"><img width="190" height="400" alt="'+adverts8.text+'" class="lazy" data-original="'+adverts8.link+'"></a>';
						$('[data-role="AdvBanner-5f"]').html(leftAdTpl);

						var adverts9 = res.data.adverts109;
						var imagesTpl = '';
						$.each(adverts9, function(index, item) {
							if(index > 3) return;
							imagesTpl += '<div class="AdvBanner lazypic-init" style="margin-bottom:0px;"> <a href="'+item.toLink+'" title="'+item.text+'" target="_blank"><img width="210" height="270" alt="'+item.text+'" class="lazy" data-original="'+item.link+'"></a> </div>';
						})
						$('[data-role="images-5f"]').html(imagesTpl);

						var tabGoods10 = res.data.tabGoods110;
						var goodsTpl = '';
						$.each(tabGoods10.productsList, function(index, item) {
							if(index > 3) return;
							if(item.defaultImage == null) {
								item.defaultImage = {
									surl: ''
								}
							}

							var mktpriceTpl = '';
							if(item.specPrice != 0) {
								mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
								mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
							} else {
								mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
							}

							goodsTpl += '<li>\
						                  <div class="goodpic lazypic-init" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="80" height="80" class="lazy" data-original="'+item.defaultImage.surl+'"></a> </div>\
						                  <div class="info">\
						                    <h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'</div>\
						                </li>';
						})
						$('[data-role="goods-5f"]').html(goodsTpl);

						var navs11 = res.data.navs111;
						if(navs11 != null) {
							var goodsCatsTpl11 = '<ul class="qfnavs">';
							$.each(navs11, function(indexDir, itemDir) {
								goodsCatsTpl11 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl11 += '</ul>';
							$('[data-role="goodsCats-5f"]').append(goodsCatsTpl11);
						}


						var navs12 = res.data.navs112;
						if(navs12 != null) {
							var goodsCatsTpl12 = '<ul class="qfnavs">';
							$.each(navs12, function(indexDir, itemDir) {
								goodsCatsTpl12 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl12 += '</ul>';
							$('[data-role="goodsCats-5f"]').append(goodsCatsTpl12);
						}

						var navs13 = res.data.navs113;
						if(navs13 != null) {
							var goodsCatsTpl13 = '<ul class="qfnavs">';
							$.each(navs13, function(indexDir, itemDir) {
								goodsCatsTpl13 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl13 += '</ul>';
							$('[data-role="goodsCats-5f"]').append(goodsCatsTpl13);
						}


						var adPic24 = res.data.adPic124;
						var adPic24Tpl = '';
						if(adPic24 != null) {
							adPic24Tpl += '<div class="logosBg logoshover" style="left: 11px; top: 24px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic24.adPicLink+'" target="_blank"><img data-original="'+adPic24.adPic+'" alt="'+adPic24.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic24Tpl);

						var adPic25 = res.data.adPic125;
						var adPic25Tpl = '';
						if(adPic25 != null) {
							adPic25Tpl += '<div class="logosBg" style="left: 102px; top: 24px;">\
									  <div class="logos" style="left: 22px; top: 21px;"> <a href="'+adPic25.adPicLink+'" target="_blank"><img data-original="'+adPic25.adPic+'" alt="'+adPic25.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic25Tpl);

						var adPic26 = res.data.adPic126;
						var adPic26Tpl = '';
						if(adPic26 != null) {
							adPic26Tpl += '<div class="logosBg" style="left: 55px; top: 69px;">\
									  <div class="logos" style="left: 23px; top: 21px;"> <a href="'+adPic26.adPicLink+'" target="_blank"><img data-original="'+adPic26.adPic+'" alt="'+adPic26.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic26Tpl);

						var adPic27 = res.data.adPic127;
						var adPic27Tpl = '';
						if(adPic27 != null) {
							adPic27Tpl += '<div class="logosBg" style="top: 113px; left: 11px;">\
									  <div class="logos" style="left: 21px; top: 21px;"> <a href="'+adPic27.adPicLink+'" target="_blank"><img data-original="'+adPic27.adPic+'" alt="'+adPic27.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic27Tpl);

						var adPic28 = res.data.adPic128;
						var adPic28Tpl = '';
						if(adPic28 != null) {
							adPic28Tpl += '<div class="logosBg" style="left: 102px; top: 114px;">\
									  <div class="logos" style="left: 20px; top: 21px;"> <a href="'+adPic28.adPicLink+'" target="_blank"><img data-original="'+adPic28.adPic+'" alt="'+adPic28.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic28Tpl);

						var adPic29 = res.data.adPic129;
						var adPic29Tpl = '';
						if(adPic29 != null) {
							adPic29Tpl += '<div class="logosBg" style="top: 159px; left: 53px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic29.adPicLink+'" target="_blank"><img data-original="'+adPic29.adPic+'" alt="'+adPic29.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic29Tpl);

						var adPic30 = res.data.adPic130;
						var adPic30Tpl = '';
						if(adPic30 != null) {
							adPic30Tpl += '<div class="logosBg" style="left: 11px; top: 202px;">\
									  <div class="logos" style="top: 21px; left: 23px;"> <a href="'+adPic30.adPicLink+'" target="_blank"><img data-original="'+adPic30.adPic+'" alt="'+adPic30.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic30Tpl);

						var adPic31 = res.data.adPic131;
						var adPic31Tpl = '';
						if(adPic31 != null) {
							adPic31Tpl += '<div class="logosBg" style="top: 203px; left: 102px;">\
									  <div class="logos" style="top: 21px; left: 20px;"> <a href="'+adPic31.adPicLink+'" target="_blank"><img data-original="'+adPic31.adPic+'" alt="'+adPic31.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic31Tpl);

						var adPic32 = res.data.adPic132;
						if(adPic32 != null) {
							var adPic32Tpl = '<a href="'+adPic32.adPicLink+'" target="_blank"><img data-original="'+adPic32.adPic+'" alt="'+adPic32.adPicTxt+'" width="200" height="100"></a>';
							$('[data-role="hotBrands-5f"] .floor-bottom').html(adPic32Tpl)
						}

						var rank = res.data.rank;
						var weekTpl = '';
						var weekBdTpl = '';
						var weekTplLen = rank.length
						$.each(rank, function(index, item) {
							if(index == 0) {
								weekTpl += '<li class="tab-on"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else if(index == (weekTplLen - 1)) {
								weekTpl += '<li class="last"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else {
								weekTpl += '<li><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							}

							if(index == 0) {
								weekBdTpl += '<div class="bd" style="display: block;">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p>'+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							} else {
								weekBdTpl += '<div class="bd">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							}
						})
						$('[data-role="hotweek-5f"] .GoodsList-Tabs ul').html(weekTpl);
						$('[data-role="hotweek-5f"]').append(weekBdTpl);
						index.lazyload();


					} else {
						iosOverlay({
							text: res.reason,
							duration: 1000
						});
					}
				},
				error: function(e) {
				}
			})
		},
		sixfloorData: function() {
			// rank
			$.ajax({
				url: wsCommon.host + '/api/index/6',
				dataType: wsCommon.jsonType,
				success: function(res) {
					if(res.code == 1) {
						var adPic135 = res.data.adPic135;
						var adPic135Tpl = '<a href="'+adPic135.adPicLink+'" target="_blank"><img data-original="'+adPic135.adPic+'" alt="'+adPic135.adPicTxt+'" width="'+adPic135.width+'" height="'+adPic135.height+'"></a>';
						$('[data-role="adright-6f"]').html(adPic135Tpl);

						var tabGoods136 = res.data.tabGoods136 ? res.data.tabGoods136 : [];
						var tabGoods136Tpl = '';
						$.each(tabGoods136.productsList, function(index, item) {
							if(index > 3) return;
							if(item.defaultImage == null) {
								item.defaultImage = {
									surl: ''
								}
							}

							var mktpriceTpl = '';
							if(item.specPrice != 0) {
								mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
								mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
							} else {
								mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
							}

							tabGoods136Tpl += '<li>\
								                  <div class="goodpic lazypic-init"\ style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="80" height="80" class="lazy" data-original="'+item.defaultImage.surl+'"></a> </div>\
								                  <div class="info">\
								                    <h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'</div>\
								                </li>';

							$('[data-role="listright-6f"]').html(tabGoods136Tpl);
						})

						var adPic133 = res.data.adPic133;
						var adPic133Tpl = '<a href="'+adPic133.adPicLink+'" target="_blank"><img data-original="'+adPic133.adPic+'" alt="'+adPic133.adPicTxt+'" width="'+adPic133.width+'" height="'+adPic133.height+'"></a>';
						$('[data-role="adleft-6f"]').html(adPic133Tpl);

						var tabGoods134 = res.data.tabGoods134 ? res.data.tabGoods134 : [];
						var tabGoods134Tpl = '';
						$.each(tabGoods134.productsList, function(index, item) {
							if(index > 3) return;
							if(item.defaultImage == null) {
								item.defaultImage = {
									surl: ''
								}
							}

							var mktpriceTpl = '';
							if(item.specPrice != 0) {
								mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
								mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
							} else {
								mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
							}

							tabGoods134Tpl += '<li>\
								                  <div class="goodpic lazypic-init"\ style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="80" height="80" class="lazy" data-original="'+item.defaultImage.surl+'"></a> </div>\
								                  <div class="info">\
								                    <h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'</div>\
								                </li>';

							$('[data-role="listleft-6f"]').html(tabGoods134Tpl);
							$("img").lazyload({effect: "fadeIn"});
						})
					} else {
						iosOverlay({
							text: res.reason,
							duration: 1000
						});
					}
				},
				error: function(e) {
				}
			})
		},
		lazyload: function() {
			$("img").lazyload({});
		},
		init: function() {
			this.getTopData();
			this.guessyoulike();
			this.changeGuessYouLike();
			this.onefloorData();
			this.twofloorData();
			this.threefloorData();
			this.fourfloorData();
			this.fivefloorData();
			this.sixfloorData();
		}
	}

	index.init();
})
$(function(){
	var sArr = [0, 120, 150, 140, 80];
	var index = {
		getTopData: function() {
			$.ajax({
			    url: wsCommon.host + '/api/index/main',
			    dataType: wsCommon.jsonType,
			    success: function(res) {
			        if(res.code == 1) {
			            var slide1 = res.data.slide1;
						var slide4 = res.data.slide4;
						var notices = res.data.notices;
						var sameCity = res.data.sameCity;
						var saleAd = res.data.sale;
						var limitGoods = res.data.limitGoods;
						var navMenu = res.data.navMenu;

						// 大图轮播
						index.swithimage(slide1);

						// 小图轮播
						index.handprice(slide4);

						//限购
						index.specialsale(limitGoods);

						index.notices(sameCity, notices, saleAd);
			        } else {
			            iosOverlay({
			                text: res.reason,
			                duration: 1000
			            });
			        }
			    },
			    error: function(e) {
			    }
			})
		},
		// 图片轮播
		swithimage: function(data) {
			var dataReal = data;
			var tpl = '';
			var data = data.pictures;
			$.each(data, function(index, item) {
				tpl += '<li class="switchable-panel" style=""> <a href="'+item.linkTarget+'"  target="_blank"> <img width="800px" height="327px" alt="'+item.linkInfo+'" src="'+item.link+'"> </a> </li>';
			})
			$('#ex_slide_591 ol').html(tpl);


			if(dataReal.autoplay) {
				var timeout = dataReal.interval * 1000;
			} else {
				var timeout = 0;
			}
			/**图片切换1**/
			$("#ex_slide_591 .switchable-content").cycle({
				pager: '#pager_591',
				activePagerClass: 'active',
				timeout: timeout,
				pagerAnchorBuilder: function(idx, slide){
						idx += 1;
						return '<li>'　+ idx + '</li>';
					}
				});
		},
		// 剁手价
		handprice: function(data) {
			var dataReal = data;
			var data = data.pictures;
			var tpl = '';
			$.each(data, function(index, item) {
				tpl += '<li class="switchable-panel" style="float: left;"> <a href="'+item.linkTarget+'" title="'+item.linkInfo+'" target="_blank"> <img width="198px" height="298px" alt="'+item.linkInfo+'" src="'+item.link+'"> </a> </li>';
			})
			$('#ex_slide_3123 ol').html(tpl);

			if(dataReal.autoplay) {
				var timeout = dataReal.interval * 1000;
			} else {
				var timeout = 0;
			}
			/**图片切换2**/
			$("#ex_slide_3123 .switchable-content").cycle({
				pager: '#pager_3123',
				activePagerClass: 'active',
				timeout: timeout,
				pagerAnchorBuilder: function(idx, slide){
						idx += 1;
						return '<li>'　+ idx + '</li>';
					}
				});
		},
		// 特价专场
		specialsale: function(limitGoods) {
			var specialList = limitGoods.productsList;
			var specialIMgWidth = sArr[limitGoods.picWidth];
			var tpl = '<a href="'+limitGoods.adPicLink+'" target="_blank" class="hd"><img src="'+limitGoods.adPic+'" alt="'+limitGoods.adPicTxt+'" width="299" height="149" style="cursor: pointer; cursor: hand;" ></a>\
						<div class="bd">\
							<ul class="clearfix">';

			$.each(specialList, function(index, item) {
				if(index > 4) return;
				if(item.defaultImage == null) {
					item.defaultImage = {}
					item.defaultImage.surl = '';
				}
				if(item.specPrice != 0) {
					var priceTpl = '<span class="price1">¥'+item.specPrice+'</span>'
					var mrkpriceTpl = '<span class="mktprice1">¥'+item.price+'</span>'
				} else {
					var priceTpl = '<span class="price1">¥'+item.price+'</span>'
					var mrkpriceTpl = ''
				}

				if(index == 1) {
					tpl += '<li class="wide-column"></li>';
				}
				if(index == 3) {
					tpl += '<li class="l'+(index+1)+' wide-column">\
							  <div class="goodpic" style="width:120px;height:120px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img src="'+item.defaultImage.surl+'" alt="'+item.name+'" width="'+specialIMgWidth+'" height="'+specialIMgWidth+'"></a> </div>\
							  <div class="info">\
								<h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>\
								<p>'+priceTpl+mrkpriceTpl+'</p>\
							  </div>\
							</li>';
				} else {
					tpl += '<li class="l'+(index+1)+'">\
							  <div class="goodpic" style="width:120px;height:120px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img src="'+item.defaultImage.surl+'" alt="'+item.name+'" width="'+specialIMgWidth+'" height="'+specialIMgWidth+'"></a> </div>\
							  <div class="info">\
								<h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>\
								<p>'+priceTpl+mrkpriceTpl+'</p>\
							  </div>\
							</li>';
				}

			})
			tpl += '</ul></div>'
			$('.limit-buy').html(tpl);
		},
		//公告+同城帮惠+广告条接口
		notices: function(sameCity, notice, saleAd) {
			var sameCityTpl = '<li><a href="'+sameCity.adPicLink+'" target="_blank"><img src="'+sameCity.adPic+'" width="200px" height="209px"></a></li>';
			$('.shopTips ul').html(sameCityTpl);

			var saleAdTpl = '<a href="'+saleAd.adPicLink+'" target="_blank"> <img src="'+saleAd.adPic+'" width="1190px" height="80px" alt=""> </a>';
			$('.saleAd').html(saleAdTpl);

			var noticeTpl = '';
			var notice = notice.list;
			$.each(notice, function(index, item) {
				noticeTpl += '<li><a title="'+item.title+'" href="/article/article-news-'+item.id+'.html" target="_blank">'+item.title+'</a></li>';
			})
			$('.article-list ul').html(noticeTpl);
		},
		// 猜你喜欢
		guessyoulikeTpl: function(goods) {
			var goodsTpl = '';
			$.each(goods, function(index, item) {
				if(item.defaultImage == null) {
					item.defaultImage = {
						surl: ''
					}
				}
				var mktpriceTpl = '';
				if(item.specPrice != 0) {
					mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
					mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
				} else {
					mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
				}

				goodsTpl += '<li>\
								  <div class="goodpic lazypic-init" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;padding-right:0;margin-right: 8px;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="100%" height="100%" class="lazy"  src="'+item.defaultImage.surl+'" style="display: inline;"></a></div>\
								  <div class="info">\
									<h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'\
								  </div>\
								</li>';
			})
			$('[data-role="guessyoulike-main"] ul').html(goodsTpl);
		},
		guessyoulike: function() {
			$.ajax({
                url: wsCommon.host + '/api/index/fav',
                dataType: wsCommon.jsonType,
                success: function(res) {
                    if(res.code == 1) {
						var images = res.data.adverts;
						var imagesTpl = '';
						$.each(images, function(index, item) {
							if(index == 1) {
								imagesTpl += '<div class="AdvBanner last lazypic-init" style="margin-bottom:0px;"> <a href="'+item.toLink+'" title="'+item.text+'" target="_blank"><img width="396" height="180" alt="'+item.text+'" class="lazy" data-original="'+item.link+'" style="display: block;"></a> </div>';
							} else {
								imagesTpl += '<div class="AdvBanner last lazypic-init" style="margin-bottom:0px;"> <a href="'+item.toLink+'" title="'+item.text+'" target="_blank"><img width="397" height="180" alt="'+item.text+'" class="lazy" data-original="'+item.link+'" style="display: block;"></a> </div>';
							}
						})
						$('.ad-show .qf_ad').html(imagesTpl);

						// var middleAd = res.data.middleAd;
						// var saleAdTpl = '<a href="'+middleAd.imgLink+'" target="_blank"> <img src="'+middleAd.imgUrl+'" alt="" width="1190px" height="80px"> </a>';
						// $('.guessyoulikeAd').html(saleAdTpl);

						var goods = res.data.favGoods;
						$('[data-role="guess"]').html(goods.title);
						window.guessResult = [];
						window.guessResultIndex = 0;
						for(var i = 0,len = goods.productsList.length;i<len;i+=12){
						   guessResult.push(goods.productsList.slice(i,i+12));
						}
						window.guessResultMaxIndex = guessResult.length;
						if(guessResult.length == 0) return;

						index.guessyoulikeTpl(guessResult[0]);
						index.lazyload();
                    } else {
                        iosOverlay({
                            text: res.reason,
                            duration: 1000
                        });
                    }
                },
                error: function(e) {
				}
            })
		},
		// 换一批
		changeGuessYouLike: function() {
			$('[data-role="changeAll"]').on('click', function() {
				if(guessResultMaxIndex == 0 ) return;
				++guessResultIndex;
				if(guessResultIndex <= guessResultMaxIndex - 1) {
					index.guessyoulikeTpl(guessResult[guessResultIndex]);
					console.log(guessResultIndex);
				} else {
					guessResultIndex = 0;
					index.guessyoulikeTpl(guessResult[guessResultIndex]);
				}
			})
		},

		// 1F
		onefloorData: function() {
			// rank
			$.ajax({
				url: wsCommon.host + '/api/index/1',
				dataType: wsCommon.jsonType,
				success: function(res) {
					if(res.code == 1) {
						// 左侧大图片
						var adverts8 = res.data.adverts8[0];
						var leftAdTpl = '<a href="'+adverts8.toLink+'" title="'+adverts8.text+'" target="_blank"><img width="190" height="400" alt="'+adverts8.text+'" class="lazy" data-original="'+adverts8.link+'"></a>';
						$('[data-role="AdvBanner-1f"]').html(leftAdTpl);

						var adverts9 = res.data.adverts9;
						var imagesTpl = '';
						$.each(adverts9, function(index, item) {
							if(index > 3) return;
							imagesTpl += '<div class="AdvBanner lazypic-init" style="margin-bottom:0px;"> <a href="'+item.toLink+'" title="'+item.text+'" target="_blank"><img width="210" height="270" alt="'+item.text+'" class="lazy" data-original="'+item.link+'"></a> </div>';
						})
						$('[data-role="images-1f"]').html(imagesTpl);

						var tabGoods10 = res.data.tabGoods10;
						var goodsTpl = '';
						$.each(tabGoods10.productsList, function(index, item) {
							if(index > 3) return;
							if(item.defaultImage == null) {
								item.defaultImage = {
									surl: ''
								}
							}

							var mktpriceTpl = '';
							if(item.specPrice != 0) {
								mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
								mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
							} else {
								mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
							}

							goodsTpl += '<li>\
						                  <div class="goodpic lazypic-init" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="80" height="80" class="lazy" data-original="'+item.defaultImage.surl+'"></a> </div>\
						                  <div class="info">\
						                    <h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'</div>\
						                </li>';
						})
						$('[data-role="goods-1f"]').html(goodsTpl);

						var navs11 = res.data.navs11;
						if(navs11 != null) {
							var goodsCatsTpl11 = '<ul class="qfnavs">';
							$.each(navs11, function(indexDir, itemDir) {
								goodsCatsTpl11 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl11 += '</ul>';
							$('[data-role="goodsCats-1f"]').append(goodsCatsTpl11);
						}


						var navs12 = res.data.navs12;
						if(navs12 != null) {
							var goodsCatsTpl12 = '<ul class="qfnavs">';
							$.each(navs12, function(indexDir, itemDir) {
								goodsCatsTpl12 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl12 += '</ul>';
							$('[data-role="goodsCats-1f"]').append(goodsCatsTpl12);
						}

						var navs13 = res.data.navs13;
						if(navs13 != null) {
							var goodsCatsTpl13 = '<ul class="qfnavs">';
							$.each(navs13, function(indexDir, itemDir) {
								goodsCatsTpl13 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl13 += '</ul>';
							$('[data-role="goodsCats-1f"]').append(goodsCatsTpl13);
						}


						var adPic24 = res.data.adPic24;
						var adPic24Tpl = '';
						if(adPic24 != null) {
							adPic24Tpl += '<div class="logosBg logoshover" style="left: 11px; top: 24px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic24.adPicLink+'" target="_blank"><img data-original="'+adPic24.adPic+'" alt="'+adPic24.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic24Tpl);

						var adPic25 = res.data.adPic25;
						var adPic25Tpl = '';
						if(adPic25 != null) {
							adPic25Tpl += '<div class="logosBg" style="left: 102px; top: 24px;">\
									  <div class="logos" style="left: 22px; top: 21px;"> <a href="'+adPic25.adPicLink+'" target="_blank"><img data-original="'+adPic25.adPic+'" alt="'+adPic25.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic25Tpl);

						var adPic26 = res.data.adPic26;
						var adPic26Tpl = '';
						if(adPic26 != null) {
							adPic26Tpl += '<div class="logosBg" style="left: 55px; top: 69px;">\
									  <div class="logos" style="left: 23px; top: 21px;"> <a href="'+adPic26.adPicLink+'" target="_blank"><img data-original="'+adPic26.adPic+'" alt="'+adPic26.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic26Tpl);

						var adPic27 = res.data.adPic27;
						var adPic27Tpl = '';
						if(adPic27 != null) {
							adPic27Tpl += '<div class="logosBg" style="top: 113px; left: 11px;">\
									  <div class="logos" style="left: 21px; top: 21px;"> <a href="'+adPic27.adPicLink+'" target="_blank"><img data-original="'+adPic27.adPic+'" alt="'+adPic27.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic27Tpl);

						var adPic28 = res.data.adPic28;
						var adPic28Tpl = '';
						if(adPic28 != null) {
							adPic28Tpl += '<div class="logosBg" style="left: 102px; top: 114px;">\
									  <div class="logos" style="left: 20px; top: 21px;"> <a href="'+adPic28.adPicLink+'" target="_blank"><img data-original="'+adPic28.adPic+'" alt="'+adPic28.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic28Tpl);

						var adPic29 = res.data.adPic29;
						var adPic29Tpl = '';
						if(adPic29 != null) {
							adPic29Tpl += '<div class="logosBg" style="top: 159px; left: 53px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic29.adPicLink+'" target="_blank"><img data-original="'+adPic29.adPic+'" alt="'+adPic29.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic29Tpl);

						var adPic30 = res.data.adPic30;
						var adPic30Tpl = '';
						if(adPic30 != null) {
							adPic30Tpl += '<div class="logosBg" style="left: 11px; top: 202px;">\
									  <div class="logos" style="top: 21px; left: 23px;"> <a href="'+adPic30.adPicLink+'" target="_blank"><img data-original="'+adPic30.adPic+'" alt="'+adPic30.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic30Tpl);

						var adPic31 = res.data.adPic31;
						var adPic31Tpl = '';
						if(adPic31 != null) {
							adPic31Tpl += '<div class="logosBg" style="top: 203px; left: 102px;">\
									  <div class="logos" style="top: 21px; left: 20px;"> <a href="'+adPic31.adPicLink+'" target="_blank"><img data-original="'+adPic31.adPic+'" alt="'+adPic31.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-1f"] .logosMain').append(adPic31Tpl);

						var adPic32 = res.data.adPic32;
						if(adPic32 != null) {
							var adPic32Tpl = '<a href="'+adPic32.adPicLink+'" target="_blank"><img data-original="'+adPic32.adPic+'" alt="'+adPic32.adPicTxt+'" width="200" height="100"></a>';
							$('[data-role="hotBrands-1f"] .floor-bottom').html(adPic32Tpl)
						}

						var rank = res.data.rank ? res.data.rank : [];
						var weekTpl = '';
						var weekBdTpl = '';
						var weekTplLen = rank.length;
						$.each(rank, function(index, item) {
							if(index == 0) {
								weekTpl += '<li class="tab-on"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else if(index == (weekTplLen - 1)) {
								weekTpl += '<li class="last"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else {
								weekTpl += '<li><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							}

							if(index == 0) {
								weekBdTpl += '<div class="bd" style="display: block;">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									if(indexDir > 4) return;
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							} else {
								weekBdTpl += '<div class="bd">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							}
						})
						$('[data-role="hotweek-1f"] .GoodsList-Tabs ul').html(weekTpl);
						$('[data-role="hotweek-1f"]').append(weekBdTpl);
						index.lazyload();

					} else {
						iosOverlay({
							text: res.reason,
							duration: 1000
						});
					}
				},
				error: function(e) {
				}
			})
		},
		twofloorData: function() {
			// rank
			$.ajax({
				url: wsCommon.host + '/api/index/2',
				dataType: wsCommon.jsonType,
				success: function(res) {
					if(res.code == 1) {
						// 左侧大图片
						var adverts8 = res.data.adverts33[0];
						var leftAdTpl = '<a href="'+adverts8.toLink+'" title="'+adverts8.text+'" target="_blank"><img width="190" height="400" alt="'+adverts8.text+'" class="lazy" data-original="'+adverts8.link+'"></a>';
						$('[data-role="AdvBanner-2f"]').html(leftAdTpl);

						var adverts9 = res.data.adverts34;
						var imagesTpl = '';
						$.each(adverts9, function(index, item) {
							if(index > 3) return;
							imagesTpl += '<div class="AdvBanner lazypic-init" style="margin-bottom:0px;"> <a href="'+item.toLink+'" title="'+item.text+'" target="_blank"><img width="210" height="270" alt="'+item.text+'" class="lazy" data-original="'+item.link+'"></a> </div>';
						})
						$('[data-role="images-2f"]').html(imagesTpl);

						var tabGoods10 = res.data.tabGoods35?res.data.tabGoods35:[];
						var goodsTpl = '';
						$.each(tabGoods10.productsList, function(index, item) {
							if(index > 3) return;
							if(item.defaultImage == null) {
								item.defaultImage = {
									surl: ''
								}
							}

							var mktpriceTpl = '';
							if(item.specPrice != 0) {
								mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
								mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
							} else {
								mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
							}

							goodsTpl += '<li>\
						                  <div class="goodpic lazypic-init" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="80" height="80" class="lazy" data-original="'+item.defaultImage.surl+'"></a> </div>\
						                  <div class="info">\
						                    <h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'</div>\
						                </li>';
						})
						$('[data-role="goods-2f"]').html(goodsTpl);

						var navs11 = res.data.navs36;
						if(navs11 != null) {
							var goodsCatsTpl11 = '<ul class="qfnavs">';
							$.each(navs11, function(indexDir, itemDir) {
								goodsCatsTpl11 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl11 += '</ul>';
							$('[data-role="goodsCats-2f"]').append(goodsCatsTpl11);
						}


						var navs12 = res.data.navs37;
						if(navs12 != null) {
							var goodsCatsTpl12 = '<ul class="qfnavs">';
							$.each(navs12, function(indexDir, itemDir) {
								goodsCatsTpl12 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl12 += '</ul>';
							$('[data-role="goodsCats-2f"]').append(goodsCatsTpl12);
						}

						var navs13 = res.data.navs38;
						if(navs13 != null) {
							var goodsCatsTpl13 = '<ul class="qfnavs">';
							$.each(navs13, function(indexDir, itemDir) {
								goodsCatsTpl13 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl13 += '</ul>';
							$('[data-role="goodsCats-2f"]').append(goodsCatsTpl13);
						}


						var adPic24 = res.data.adPic49;
						var adPic24Tpl = '';
						if(adPic24 != null) {
							adPic24Tpl += '<div class="logosBg logoshover" style="left: 11px; top: 24px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic24.adPicLink+'" target="_blank"><img data-original="'+adPic24.adPic+'" alt="'+adPic24.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic24Tpl);

						var adPic25 = res.data.adPic50;
						var adPic25Tpl = '';
						if(adPic25 != null) {
							adPic25Tpl += '<div class="logosBg" style="left: 102px; top: 24px;">\
									  <div class="logos" style="left: 22px; top: 21px;"> <a href="'+adPic25.adPicLink+'" target="_blank"><img data-original="'+adPic25.adPic+'" alt="'+adPic25.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic25Tpl);

						var adPic26 = res.data.adPic51;
						var adPic26Tpl = '';
						if(adPic26 != null) {
							adPic26Tpl += '<div class="logosBg" style="left: 55px; top: 69px;">\
									  <div class="logos" style="left: 23px; top: 21px;"> <a href="'+adPic26.adPicLink+'" target="_blank"><img data-original="'+adPic26.adPic+'" alt="'+adPic26.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic26Tpl);

						var adPic27 = res.data.adPic52;
						var adPic27Tpl = '';
						if(adPic27 != null) {
							adPic27Tpl += '<div class="logosBg" style="top: 113px; left: 11px;">\
									  <div class="logos" style="left: 21px; top: 21px;"> <a href="'+adPic27.adPicLink+'" target="_blank"><img data-original="'+adPic27.adPic+'" alt="'+adPic27.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic27Tpl);

						var adPic28 = res.data.adPic53;
						var adPic28Tpl = '';
						if(adPic28 != null) {
							adPic28Tpl += '<div class="logosBg" style="left: 102px; top: 114px;">\
									  <div class="logos" style="left: 20px; top: 21px;"> <a href="'+adPic28.adPicLink+'" target="_blank"><img data-original="'+adPic28.adPic+'" alt="'+adPic28.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic28Tpl);

						var adPic29 = res.data.adPic54;
						var adPic29Tpl = '';
						if(adPic29 != null) {
							adPic29Tpl += '<div class="logosBg" style="top: 159px; left: 53px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic29.adPicLink+'" target="_blank"><img data-original="'+adPic29.adPic+'" alt="'+adPic29.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic29Tpl);

						var adPic30 = res.data.adPic55;
						var adPic30Tpl = '';
						if(adPic30 != null) {
							adPic30Tpl += '<div class="logosBg" style="left: 11px; top: 202px;">\
									  <div class="logos" style="top: 21px; left: 23px;"> <a href="'+adPic30.adPicLink+'" target="_blank"><img data-original="'+adPic30.adPic+'" alt="'+adPic30.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic30Tpl);

						var adPic31 = res.data.adPic56;
						var adPic31Tpl = '';
						if(adPic31 != null) {
							adPic31Tpl += '<div class="logosBg" style="top: 203px; left: 102px;">\
									  <div class="logos" style="top: 21px; left: 20px;"> <a href="'+adPic31.adPicLink+'" target="_blank"><img data-original="'+adPic31.adPic+'" alt="'+adPic31.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-2f"] .logosMain').append(adPic31Tpl);

						var adPic32 = res.data.adPic57;
						if(adPic32 != null) {
							var adPic32Tpl = '<a href="'+adPic32.adPicLink+'" target="_blank"><img data-original="'+adPic32.adPic+'" alt="'+adPic32.adPicTxt+'" width="200" height="100"></a>';
							$('[data-role="hotBrands-2f"] .floor-bottom').html(adPic32Tpl)
						}

						var rank = res.data.rank;
						var weekTpl = '';
						var weekBdTpl = '';
						var weekTplLen = rank.length
						$.each(rank, function(index, item) {
							if(index == 0) {
								weekTpl += '<li class="tab-on"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else if(index == (weekTplLen - 1)) {
								weekTpl += '<li class="last"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else {
								weekTpl += '<li><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							}

							if(index == 0) {
								weekBdTpl += '<div class="bd" style="display: block;">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							} else {
								weekBdTpl += '<div class="bd">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							}
						})
						$('[data-role="hotweek-2f"] .GoodsList-Tabs ul').html(weekTpl);
						$('[data-role="hotweek-2f"]').append(weekBdTpl);
						index.lazyload();


					} else {
						iosOverlay({
							text: res.reason,
							duration: 1000
						});
					}
				},
				error: function(e) {
				}
			})
		},
		threefloorData: function() {
			// rank
			$.ajax({
				url: wsCommon.host + '/api/index/3',
				dataType: wsCommon.jsonType,
				success: function(res) {
					if(res.code == 1) {
						// 左侧大图片
						var adverts8 = res.data.adverts58[0];
						var leftAdTpl = '<a href="'+adverts8.toLink+'" title="'+adverts8.text+'" target="_blank"><img width="190" height="400" alt="'+adverts8.text+'" class="lazy" data-original="'+adverts8.link+'"></a>';
						$('[data-role="AdvBanner-3f"]').html(leftAdTpl);

						var adverts9 = res.data.adverts59;
						var imagesTpl = '';
						$.each(adverts9, function(index, item) {
							if(index > 3) return;
							imagesTpl += '<div class="AdvBanner lazypic-init" style="margin-bottom:0px;"> <a href="'+item.toLink+'" title="'+item.text+'" target="_blank"><img width="210" height="270" alt="'+item.text+'" class="lazy" data-original="'+item.link+'"></a> </div>';
						})
						$('[data-role="images-3f"]').html(imagesTpl);

						var tabGoods10 = res.data.tabGoods60;
						var goodsTpl = '';
						$.each(tabGoods10.productsList, function(index, item) {
							if(index > 3) return;
							if(item.defaultImage == null) {
								item.defaultImage = {
									surl: ''
								}
							}

							var mktpriceTpl = '';
							if(item.specPrice != 0) {
								mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
								mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
							} else {
								mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
							}

							goodsTpl += '<li>\
						                  <div class="goodpic lazypic-init" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="80" height="80" class="lazy" data-original="'+item.defaultImage.surl+'"></a> </div>\
						                  <div class="info">\
						                    <h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'</div>\
						                </li>';
						})
						$('[data-role="goods-3f"]').html(goodsTpl);

						var navs11 = res.data.navs61;
						if(navs11 != null) {
							var goodsCatsTpl11 = '<ul class="qfnavs">';
							$.each(navs11, function(indexDir, itemDir) {
								goodsCatsTpl11 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl11 += '</ul>';
							$('[data-role="goodsCats-3f"]').append(goodsCatsTpl11);
						}


						var navs12 = res.data.navs62;
						if(navs12 != null) {
							var goodsCatsTpl12 = '<ul class="qfnavs">';
							$.each(navs12, function(indexDir, itemDir) {
								goodsCatsTpl12 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl12 += '</ul>';
							$('[data-role="goodsCats-3f"]').append(goodsCatsTpl12);
						}

						var navs13 = res.data.navs63;
						if(navs13 != null) {
							var goodsCatsTpl13 = '<ul class="qfnavs">';
							$.each(navs13, function(indexDir, itemDir) {
								goodsCatsTpl13 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl13 += '</ul>';
							$('[data-role="goodsCats-3f"]').append(goodsCatsTpl13);
						}


						var adPic24 = res.data.adPic74;
						var adPic24Tpl = '';
						if(adPic24 != null) {
							adPic24Tpl += '<div class="logosBg logoshover" style="left: 11px; top: 24px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic24.adPicLink+'" target="_blank"><img data-original="'+adPic24.adPic+'" alt="'+adPic24.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic24Tpl);

						var adPic25 = res.data.adPic75;
						var adPic25Tpl = '';
						if(adPic25 != null) {
							adPic25Tpl += '<div class="logosBg" style="left: 102px; top: 24px;">\
									  <div class="logos" style="left: 22px; top: 21px;"> <a href="'+adPic25.adPicLink+'" target="_blank"><img data-original="'+adPic25.adPic+'" alt="'+adPic25.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic25Tpl);

						var adPic26 = res.data.adPic76;
						var adPic26Tpl = '';
						if(adPic26 != null) {
							adPic26Tpl += '<div class="logosBg" style="left: 55px; top: 69px;">\
									  <div class="logos" style="left: 23px; top: 21px;"> <a href="'+adPic26.adPicLink+'" target="_blank"><img data-original="'+adPic26.adPic+'" alt="'+adPic26.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic26Tpl);

						var adPic27 = res.data.adPic77;
						var adPic27Tpl = '';
						if(adPic27 != null) {
							adPic27Tpl += '<div class="logosBg" style="top: 113px; left: 11px;">\
									  <div class="logos" style="left: 21px; top: 21px;"> <a href="'+adPic27.adPicLink+'" target="_blank"><img data-original="'+adPic27.adPic+'" alt="'+adPic27.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic27Tpl);

						var adPic28 = res.data.adPic78;
						var adPic28Tpl = '';
						if(adPic28 != null) {
							adPic28Tpl += '<div class="logosBg" style="left: 102px; top: 114px;">\
									  <div class="logos" style="left: 20px; top: 21px;"> <a href="'+adPic28.adPicLink+'" target="_blank"><img data-original="'+adPic28.adPic+'" alt="'+adPic28.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic28Tpl);

						var adPic29 = res.data.adPic79;
						var adPic29Tpl = '';
						if(adPic29 != null) {
							adPic29Tpl += '<div class="logosBg" style="top: 159px; left: 53px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic29.adPicLink+'" target="_blank"><img data-original="'+adPic29.adPic+'" alt="'+adPic29.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic29Tpl);

						var adPic30 = res.data.adPic80;
						var adPic30Tpl = '';
						if(adPic30 != null) {
							adPic30Tpl += '<div class="logosBg" style="left: 11px; top: 202px;">\
									  <div class="logos" style="top: 21px; left: 23px;"> <a href="'+adPic30.adPicLink+'" target="_blank"><img data-original="'+adPic30.adPic+'" alt="'+adPic30.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic30Tpl);

						var adPic31 = res.data.adPic81;
						var adPic31Tpl = '';
						if(adPic31 != null) {
							adPic31Tpl += '<div class="logosBg" style="top: 203px; left: 102px;">\
									  <div class="logos" style="top: 21px; left: 20px;"> <a href="'+adPic31.adPicLink+'" target="_blank"><img data-original="'+adPic31.adPic+'" alt="'+adPic31.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-3f"] .logosMain').append(adPic31Tpl);

						var adPic32 = res.data.adPic82;
						if(adPic32 != null) {
							var adPic32Tpl = '<a href="'+adPic32.adPicLink+'" target="_blank"><img data-original="'+adPic32.adPic+'" alt="'+adPic32.adPicTxt+'" width="200" height="100"></a>';
							$('[data-role="hotBrands-3f"] .floor-bottom').html(adPic32Tpl)
						}

						var rank = res.data.rank;
						var weekTpl = '';
						var weekBdTpl = '';
						var weekTplLen = rank.length
						$.each(rank, function(index, item) {
							if(index == 0) {
								weekTpl += '<li class="tab-on"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else if(index == (weekTplLen - 1)) {
								weekTpl += '<li class="last"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else {
								weekTpl += '<li><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							}

							if(index == 0) {
								weekBdTpl += '<div class="bd" style="display: block;">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							} else {
								weekBdTpl += '<div class="bd">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p>  '+mktpriceTpl+'  </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							}
						})
						$('[data-role="hotweek-3f"] .GoodsList-Tabs ul').html(weekTpl);
						$('[data-role="hotweek-3f"]').append(weekBdTpl);
						index.lazyload();


					} else {
						iosOverlay({
							text: res.reason,
							duration: 1000
						});
					}
				},
				error: function(e) {
				}
			})
		},
		fourfloorData: function() {
			// rank
			$.ajax({
				url: wsCommon.host + '/api/index/4',
				dataType: wsCommon.jsonType,
				success: function(res) {
					if(res.code == 1) {
						// 左侧大图片
						var adverts8 = res.data.adverts83[0];
						var leftAdTpl = '<a href="'+adverts8.toLink+'" title="'+adverts8.text+'" target="_blank"><img width="190" height="400" alt="'+adverts8.text+'" class="lazy" data-original="'+adverts8.link+'"></a>';
						$('[data-role="AdvBanner-4f"]').html(leftAdTpl);

						var adverts9 = res.data.adverts84;
						var imagesTpl = '';
						$.each(adverts9, function(index, item) {
							if(index > 3) return;
							imagesTpl += '<div class="AdvBanner lazypic-init" style="margin-bottom:0px;"> <a href="'+item.toLink+'" title="'+item.text+'" target="_blank"><img width="210" height="270" alt="'+item.text+'" class="lazy" data-original="'+item.link+'"></a> </div>';
						})
						$('[data-role="images-4f"]').html(imagesTpl);

						var tabGoods10 = res.data.tabGoods85;
						var goodsTpl = '';
						$.each(tabGoods10.productsList, function(index, item) {
							if(index > 3) return;
							if(item.defaultImage == null) {
								item.defaultImage = {
									surl: ''
								}
							}

							var mktpriceTpl = '';
							if(item.specPrice != 0) {
								mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
								mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
							} else {
								mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
							}

							goodsTpl += '<li>\
						                  <div class="goodpic lazypic-init" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="80" height="80" class="lazy" data-original="'+item.defaultImage.surl+'"></a> </div>\
						                  <div class="info">\
						                    <h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'</div>\
						                </li>';
						})
						$('[data-role="goods-4f"]').html(goodsTpl);

						var navs11 = res.data.navs86;
						if(navs11 != null) {
							var goodsCatsTpl11 = '<ul class="qfnavs">';
							$.each(navs11, function(indexDir, itemDir) {
								goodsCatsTpl11 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl11 += '</ul>';
							$('[data-role="goodsCats-4f"]').append(goodsCatsTpl11);
						}


						var navs12 = res.data.navs87;
						if(navs12 != null) {
							var goodsCatsTpl12 = '<ul class="qfnavs">';
							$.each(navs12, function(indexDir, itemDir) {
								goodsCatsTpl12 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl12 += '</ul>';
							$('[data-role="goodsCats-4f"]').append(goodsCatsTpl12);
						}

						var navs13 = res.data.navs88;
						if(navs13 != null) {
							var goodsCatsTpl13 = '<ul class="qfnavs">';
							$.each(navs13, function(indexDir, itemDir) {
								goodsCatsTpl13 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl13 += '</ul>';
							$('[data-role="goodsCats-4f"]').append(goodsCatsTpl13);
						}


						var adPic24 = res.data.adPic99;
						var adPic24Tpl = '';
						if(adPic24 != null) {
							adPic24Tpl += '<div class="logosBg logoshover" style="left: 11px; top: 24px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic24.adPicLink+'" target="_blank"><img data-original="'+adPic24.adPic+'" alt="'+adPic24.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic24Tpl);

						var adPic25 = res.data.adPic100;
						var adPic25Tpl = '';
						if(adPic25 != null) {
							adPic25Tpl += '<div class="logosBg" style="left: 102px; top: 24px;">\
									  <div class="logos" style="left: 22px; top: 21px;"> <a href="'+adPic25.adPicLink+'" target="_blank"><img data-original="'+adPic25.adPic+'" alt="'+adPic25.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic25Tpl);

						var adPic26 = res.data.adPic101;
						var adPic26Tpl = '';
						if(adPic26 != null) {
							adPic26Tpl += '<div class="logosBg" style="left: 55px; top: 69px;">\
									  <div class="logos" style="left: 23px; top: 21px;"> <a href="'+adPic26.adPicLink+'" target="_blank"><img data-original="'+adPic26.adPic+'" alt="'+adPic26.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic26Tpl);

						var adPic27 = res.data.adPic102;
						var adPic27Tpl = '';
						if(adPic27 != null) {
							adPic27Tpl += '<div class="logosBg" style="top: 113px; left: 11px;">\
									  <div class="logos" style="left: 21px; top: 21px;"> <a href="'+adPic27.adPicLink+'" target="_blank"><img data-original="'+adPic27.adPic+'" alt="'+adPic27.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic27Tpl);

						var adPic28 = res.data.adPic103;
						var adPic28Tpl = '';
						if(adPic28 != null) {
							adPic28Tpl += '<div class="logosBg" style="left: 102px; top: 114px;">\
									  <div class="logos" style="left: 20px; top: 21px;"> <a href="'+adPic28.adPicLink+'" target="_blank"><img data-original="'+adPic28.adPic+'" alt="'+adPic28.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic28Tpl);

						var adPic29 = res.data.adPic104;
						var adPic29Tpl = '';
						if(adPic29 != null) {
							adPic29Tpl += '<div class="logosBg" style="top: 159px; left: 53px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic29.adPicLink+'" target="_blank"><img data-original="'+adPic29.adPic+'" alt="'+adPic29.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic29Tpl);

						var adPic30 = res.data.adPic105;
						var adPic30Tpl = '';
						if(adPic30 != null) {
							adPic30Tpl += '<div class="logosBg" style="left: 11px; top: 202px;">\
									  <div class="logos" style="top: 21px; left: 23px;"> <a href="'+adPic30.adPicLink+'" target="_blank"><img data-original="'+adPic30.adPic+'" alt="'+adPic30.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic30Tpl);

						var adPic31 = res.data.adPic106;
						var adPic31Tpl = '';
						if(adPic31 != null) {
							adPic31Tpl += '<div class="logosBg" style="top: 203px; left: 102px;">\
									  <div class="logos" style="top: 21px; left: 20px;"> <a href="'+adPic31.adPicLink+'" target="_blank"><img data-original="'+adPic31.adPic+'" alt="'+adPic31.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-4f"] .logosMain').append(adPic31Tpl);

						var adPic32 = res.data.adPic107;
						if(adPic32 != null) {
							var adPic32Tpl = '<a href="'+adPic32.adPicLink+'" target="_blank"><img data-original="'+adPic32.adPic+'" alt="'+adPic32.adPicTxt+'" width="200" height="100"></a>';
							$('[data-role="hotBrands-4f"] .floor-bottom').html(adPic32Tpl)
						}

						var rank = res.data.rank;
						var weekTpl = '';
						var weekBdTpl = '';
						var weekTplLen = rank.length
						$.each(rank, function(index, item) {
							if(index == 0) {
								weekTpl += '<li class="tab-on"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else if(index == (weekTplLen - 1)) {
								weekTpl += '<li class="last"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else {
								weekTpl += '<li><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							}

							if(index == 0) {
								weekBdTpl += '<div class="bd" style="display: block;">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							} else {
								weekBdTpl += '<div class="bd">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							}
						})
						$('[data-role="hotweek-4f"] .GoodsList-Tabs ul').html(weekTpl);
						$('[data-role="hotweek-4f"]').append(weekBdTpl);
						index.lazyload();


					} else {
						iosOverlay({
							text: res.reason,
							duration: 1000
						});
					}
				},
				error: function(e) {
				}
			})
		},
		fivefloorData: function() {
			// rank
			$.ajax({
				url: wsCommon.host + '/api/index/5',
				dataType: wsCommon.jsonType,
				success: function(res) {
					if(res.code == 1) {
						// 左侧大图片
						var adverts8 = res.data.adverts108[0];
						var leftAdTpl = '<a href="'+adverts8.toLink+'" title="'+adverts8.text+'" target="_blank"><img width="190" height="400" alt="'+adverts8.text+'" class="lazy" data-original="'+adverts8.link+'"></a>';
						$('[data-role="AdvBanner-5f"]').html(leftAdTpl);

						var adverts9 = res.data.adverts109;
						var imagesTpl = '';
						$.each(adverts9, function(index, item) {
							if(index > 3) return;
							imagesTpl += '<div class="AdvBanner lazypic-init" style="margin-bottom:0px;"> <a href="'+item.toLink+'" title="'+item.text+'" target="_blank"><img width="210" height="270" alt="'+item.text+'" class="lazy" data-original="'+item.link+'"></a> </div>';
						})
						$('[data-role="images-5f"]').html(imagesTpl);

						var tabGoods10 = res.data.tabGoods110;
						var goodsTpl = '';
						$.each(tabGoods10.productsList, function(index, item) {
							if(index > 3) return;
							if(item.defaultImage == null) {
								item.defaultImage = {
									surl: ''
								}
							}

							var mktpriceTpl = '';
							if(item.specPrice != 0) {
								mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
								mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
							} else {
								mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
							}

							goodsTpl += '<li>\
						                  <div class="goodpic lazypic-init" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="80" height="80" class="lazy" data-original="'+item.defaultImage.surl+'"></a> </div>\
						                  <div class="info">\
						                    <h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'</div>\
						                </li>';
						})
						$('[data-role="goods-5f"]').html(goodsTpl);

						var navs11 = res.data.navs111;
						if(navs11 != null) {
							var goodsCatsTpl11 = '<ul class="qfnavs">';
							$.each(navs11, function(indexDir, itemDir) {
								goodsCatsTpl11 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl11 += '</ul>';
							$('[data-role="goodsCats-5f"]').append(goodsCatsTpl11);
						}


						var navs12 = res.data.navs112;
						if(navs12 != null) {
							var goodsCatsTpl12 = '<ul class="qfnavs">';
							$.each(navs12, function(indexDir, itemDir) {
								goodsCatsTpl12 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl12 += '</ul>';
							$('[data-role="goodsCats-5f"]').append(goodsCatsTpl12);
						}

						var navs13 = res.data.navs113;
						if(navs13 != null) {
							var goodsCatsTpl13 = '<ul class="qfnavs">';
							$.each(navs13, function(indexDir, itemDir) {
								goodsCatsTpl13 += '<li><a href="'+itemDir.url+'" target="'+itemDir.target+'">'+itemDir.text+'</a></li>';
							})
							goodsCatsTpl13 += '</ul>';
							$('[data-role="goodsCats-5f"]').append(goodsCatsTpl13);
						}


						var adPic24 = res.data.adPic124;
						var adPic24Tpl = '';
						if(adPic24 != null) {
							adPic24Tpl += '<div class="logosBg logoshover" style="left: 11px; top: 24px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic24.adPicLink+'" target="_blank"><img data-original="'+adPic24.adPic+'" alt="'+adPic24.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic24Tpl);

						var adPic25 = res.data.adPic125;
						var adPic25Tpl = '';
						if(adPic25 != null) {
							adPic25Tpl += '<div class="logosBg" style="left: 102px; top: 24px;">\
									  <div class="logos" style="left: 22px; top: 21px;"> <a href="'+adPic25.adPicLink+'" target="_blank"><img data-original="'+adPic25.adPic+'" alt="'+adPic25.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic25Tpl);

						var adPic26 = res.data.adPic126;
						var adPic26Tpl = '';
						if(adPic26 != null) {
							adPic26Tpl += '<div class="logosBg" style="left: 55px; top: 69px;">\
									  <div class="logos" style="left: 23px; top: 21px;"> <a href="'+adPic26.adPicLink+'" target="_blank"><img data-original="'+adPic26.adPic+'" alt="'+adPic26.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic26Tpl);

						var adPic27 = res.data.adPic127;
						var adPic27Tpl = '';
						if(adPic27 != null) {
							adPic27Tpl += '<div class="logosBg" style="top: 113px; left: 11px;">\
									  <div class="logos" style="left: 21px; top: 21px;"> <a href="'+adPic27.adPicLink+'" target="_blank"><img data-original="'+adPic27.adPic+'" alt="'+adPic27.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic27Tpl);

						var adPic28 = res.data.adPic128;
						var adPic28Tpl = '';
						if(adPic28 != null) {
							adPic28Tpl += '<div class="logosBg" style="left: 102px; top: 114px;">\
									  <div class="logos" style="left: 20px; top: 21px;"> <a href="'+adPic28.adPicLink+'" target="_blank"><img data-original="'+adPic28.adPic+'" alt="'+adPic28.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic28Tpl);

						var adPic29 = res.data.adPic129;
						var adPic29Tpl = '';
						if(adPic29 != null) {
							adPic29Tpl += '<div class="logosBg" style="top: 159px; left: 53px;">\
									  <div class="logos" style="left: 24px; top: 21px;"> <a href="'+adPic29.adPicLink+'" target="_blank"><img data-original="'+adPic29.adPic+'" alt="'+adPic29.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic29Tpl);

						var adPic30 = res.data.adPic130;
						var adPic30Tpl = '';
						if(adPic30 != null) {
							adPic30Tpl += '<div class="logosBg" style="left: 11px; top: 202px;">\
									  <div class="logos" style="top: 21px; left: 23px;"> <a href="'+adPic30.adPicLink+'" target="_blank"><img data-original="'+adPic30.adPic+'" alt="'+adPic30.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic30Tpl);

						var adPic31 = res.data.adPic131;
						var adPic31Tpl = '';
						if(adPic31 != null) {
							adPic31Tpl += '<div class="logosBg" style="top: 203px; left: 102px;">\
									  <div class="logos" style="top: 21px; left: 20px;"> <a href="'+adPic31.adPicLink+'" target="_blank"><img data-original="'+adPic31.adPic+'" alt="'+adPic31.adPicTxt+'"></a> </div>\
									</div>';
						}
						$('[data-role="hotBrands-5f"] .logosMain').append(adPic31Tpl);

						var adPic32 = res.data.adPic132;
						if(adPic32 != null) {
							var adPic32Tpl = '<a href="'+adPic32.adPicLink+'" target="_blank"><img data-original="'+adPic32.adPic+'" alt="'+adPic32.adPicTxt+'" width="200" height="100"></a>';
							$('[data-role="hotBrands-5f"] .floor-bottom').html(adPic32Tpl)
						}

						var rank = res.data.rank;
						var weekTpl = '';
						var weekBdTpl = '';
						var weekTplLen = rank.length
						$.each(rank, function(index, item) {
							if(index == 0) {
								weekTpl += '<li class="tab-on"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else if(index == (weekTplLen - 1)) {
								weekTpl += '<li class="last"><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							} else {
								weekTpl += '<li><span><a href="./list1.html?catId='+item.catId+'" target="_blank">'+item.catName+'</a></span></li>';
							}

							if(index == 0) {
								weekBdTpl += '<div class="bd" style="display: block;">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p>'+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							} else {
								weekBdTpl += '<div class="bd">\
									              <div class="qfgoods-tab">\
									                <ul class="clearfix">';
								$.each(item.catDirs, function(indexDir, itemDir) {
									if(indexDir > 4) return;
									var mktpriceTpl = '';
									if(itemDir.specPrice != 0) {
										mktpriceTpl += '<span class="price1">¥'+itemDir.specPrice+'</span>'
										mktpriceTpl += '<span class="mktprice1">¥'+itemDir.price+'</span>'
									} else {
										mktpriceTpl += '<span class="price1">¥'+itemDir.price+'</span>'
									}
									weekBdTpl += '<li class="top'+(indexDir + 1)+'">\
									                  <div class="goodpic" style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'"><img src="'+itemDir.imgUrl+'" alt="'+itemDir.name+'" width="80" height="80"></a> </div>\
									                  <div class="info">\
									                    <h6><a target="_blank" href="./info.html?goodsId='+itemDir.goodsId+'&catId='+itemDir.catId+'">'+itemDir.name+'</a></h6>\
									                    <p> '+mktpriceTpl+' </p>\
									                  </div>\
									                </li>';
								})
								weekBdTpl += '</ul></div></div>';
							}
						})
						$('[data-role="hotweek-5f"] .GoodsList-Tabs ul').html(weekTpl);
						$('[data-role="hotweek-5f"]').append(weekBdTpl);
						index.lazyload();


					} else {
						iosOverlay({
							text: res.reason,
							duration: 1000
						});
					}
				},
				error: function(e) {
				}
			})
		},
		sixfloorData: function() {
			// rank
			$.ajax({
				url: wsCommon.host + '/api/index/6',
				dataType: wsCommon.jsonType,
				success: function(res) {
					if(res.code == 1) {
						var adPic135 = res.data.adPic135;
						var adPic135Tpl = '<a href="'+adPic135.adPicLink+'" target="_blank"><img data-original="'+adPic135.adPic+'" alt="'+adPic135.adPicTxt+'" width="'+adPic135.width+'" height="'+adPic135.height+'"></a>';
						$('[data-role="adright-6f"]').html(adPic135Tpl);

						var tabGoods136 = res.data.tabGoods136 ? res.data.tabGoods136 : [];
						var tabGoods136Tpl = '';
						$.each(tabGoods136.productsList, function(index, item) {
							if(index > 3) return;
							if(item.defaultImage == null) {
								item.defaultImage = {
									surl: ''
								}
							}

							var mktpriceTpl = '';
							if(item.specPrice != 0) {
								mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
								mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
							} else {
								mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
							}

							tabGoods136Tpl += '<li>\
								                  <div class="goodpic lazypic-init"\ style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="80" height="80" class="lazy" data-original="'+item.defaultImage.surl+'"></a> </div>\
								                  <div class="info">\
								                    <h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'</div>\
								                </li>';

							$('[data-role="listright-6f"]').html(tabGoods136Tpl);
						})

						var adPic133 = res.data.adPic133;
						var adPic133Tpl = '<a href="'+adPic133.adPicLink+'" target="_blank"><img data-original="'+adPic133.adPic+'" alt="'+adPic133.adPicTxt+'" width="'+adPic133.width+'" height="'+adPic133.height+'"></a>';
						$('[data-role="adleft-6f"]').html(adPic133Tpl);

						var tabGoods134 = res.data.tabGoods134 ? res.data.tabGoods134 : [];
						var tabGoods134Tpl = '';
						$.each(tabGoods134.productsList, function(index, item) {
							if(index > 3) return;
							if(item.defaultImage == null) {
								item.defaultImage = {
									surl: ''
								}
							}

							var mktpriceTpl = '';
							if(item.specPrice != 0) {
								mktpriceTpl += '<span class="price1">¥'+item.specPrice+'</span>'
								mktpriceTpl += '<span class="mktprice1">¥'+item.price+'</span>'
							} else {
								mktpriceTpl += '<span class="price1">¥'+item.price+'</span>'
							}

							tabGoods134Tpl += '<li>\
								                  <div class="goodpic lazypic-init"\ style="width:80px;height:80px;overflow:hidden;background-color:#FFF;margin:0 auto;"><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'"><img alt="'+item.name+'" width="80" height="80" class="lazy" data-original="'+item.defaultImage.surl+'"></a> </div>\
								                  <div class="info">\
								                    <h6><a target="_blank" href="./info.html?goodsId='+item.goodsId+'&catId='+item.catId+'">'+item.name+'</a></h6>'+mktpriceTpl+'</div>\
								                </li>';

							$('[data-role="listleft-6f"]').html(tabGoods134Tpl);
							$("img").lazyload({effect: "fadeIn"});
						})
					} else {
						iosOverlay({
							text: res.reason,
							duration: 1000
						});
					}
				},
				error: function(e) {
				}
			})
		},
		lazyload: function() {
			$("img").lazyload({});
		},
		init: function() {
			this.getTopData();
			this.guessyoulike();
			this.changeGuessYouLike();
			this.onefloorData();
			this.twofloorData();
			this.threefloorData();
			this.fourfloorData();
			this.fivefloorData();
			this.sixfloorData();
		}
	}

	index.init();
})
